Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change "AHRS unhealthy" message to "no EKFn cores" if no cores exist #12651

Merged
merged 2 commits into from
Oct 29, 2019

Conversation

kd0aij
Copy link
Contributor

@kd0aij kd0aij commented Oct 24, 2019

If AHRS_EKF_TYPE=2/3 but the respective EK2/3_enable is 0, the prearm check reports
"AHRS unhealthy" without providing any clue to the cause of the problem.
This PR adds code which reports the issue .

@kd0aij kd0aij added the WIP label Oct 24, 2019
Copy link
Contributor

@tridge tridge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we are low on memory then EK2 and EK3 deliberately set enable to 0 when allocation fails
this would lead to a flood of msgs as it switches rapidly

@rmackay9
Copy link
Contributor

I like that we are thinking of a fix for this because it's confusing to (advanced) users. Another alternative would be to add a pre-arm check and then spit out a text message as to what the problem is.

@kd0aij kd0aij changed the title Force EK2/3_enable to true if AHRS_EKF_TYPE=2/3 Change "AHRS unhealthy" message to "no EKFn cores" if no cores exist Oct 26, 2019
@kd0aij
Copy link
Contributor Author

kd0aij commented Oct 26, 2019

@rmackay9 @tridge Just changed prearm_failure_reason() to return "no cores exist" instead of a null pointer. Leaves it to the user to figure out why the core pointer is null.

@kd0aij kd0aij closed this Oct 27, 2019
@kd0aij kd0aij reopened this Oct 27, 2019
@tridge
Copy link
Contributor

tridge commented Oct 28, 2019

needs description on commits

@rmackay9
Copy link
Contributor

As a side note, I think the message might be easier to understand if it was "EKF2 not initialised".

@kd0aij
Copy link
Contributor Author

kd0aij commented Oct 29, 2019

@rmackay9 Thanks, I chose "no cores" because that is the only information available by that point in the code (as far as I understand). I guess the original author thought "unhealthy" made it perfectly clear what was wrong :)

To be more useful, the message should obviously tell the user how to fix the problem, but I don't think either "no cores" or "not initialized" does that; though the latter is IMO even more vague.

But if the only reason the core pointer might be null is a lack of memory (or EKn_enable not set) then the message could change to indicate that. I assume it's not that simple, though.

@rmackay9
Copy link
Contributor

@kd0aij, ok great. I think we should probably update the wiki page so that we list all the possible failures and possible solutions. I'm going to go ahead and merge this now. thanks!

@kd0aij
Copy link
Contributor Author

kd0aij commented Oct 29, 2019

@rmackay9
Copy link
Contributor

@kd0aij, this is the pre-arm failure message so the new messages should go here I think: http://ardupilot.org/copter/docs/common-prearm-safety-checks.html#common-prearm-safety-checks

@rmackay9 rmackay9 moved this from PRs to 4.0.0-rc2 in Copter 4.0 backports Oct 31, 2019
@rmackay9 rmackay9 added this to Rover-4.0.0-rc3 in Rover 4.0 backports Nov 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Plane 4.0 Backports
  
Awaiting triage
Rover 4.0 backports
Rover-4.0.0-rc3
Development

Successfully merging this pull request may close these issues.

None yet

4 participants